home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 880 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news.cs.utah.edu!usenet
  2. From: bendixen@eng.utah.edu (Mason Bendixen)
  3. Newsgroups: comp.lang.c++
  4. Subject: Template instantiation in g++
  5. Date: 8 Jan 1996 01:49:21 GMT
  6. Organization: University of Utah Computer Science Department
  7. Message-ID: <4cpt71$sm6@magus.cs.utah.edu>
  8. Reply-To: bendixen@eng.utah.edu
  9. NNTP-Posting-Host: cadesm58.eng.utah.edu
  10.  
  11. Hi,
  12.      I just completed a good sized project making heavy usage of
  13. templates using BC++ 4.5, and after everything was working well
  14. I decided to try to port it to SparcStation at school running
  15. SunOS using g++. I had been careful careful not to use any
  16. implementation specific features or any of C++'s relatively new
  17. features so I was surprised that the program failed to link.
  18. When I tried to compile a simple test program that used only
  19. a few of the features in my templatized library with g++, I got:
  20.     
  21.     76 cadesm58:hw1% g++ -o tester tester.C
  22.     collect2: ld returned 2 exit status
  23.     ld: Undefined symbol 
  24.        ListIter<int>::insert_at(int, int const &)
  25.        List<int>::car(void)
  26.        List<int>::remove(void)
  27.        List<int>::cons(int const &)
  28.        ListIter<int>::operator[](int) const
  29.        ListIter<int>::operator[](int)
  30.        List<int>::end(void)
  31.        ListIter<int>::remove(int)
  32.  
  33. I don't even use these functions in test program. I tried Sun's
  34. own CC but it seems ancient in its language support. Is anyone
  35. familar with g++'s template support? It seems to have always
  36. worked for me in the past, but this is extremely frustrating.
  37.  
  38. Thanks (Please respond directly by E-Mail),
  39.     Mason Bendixen  
  40.   
  41.  
  42.  
  43.